package com.husd.framework.util;

import org.apache.commons.lang3.StringUtils;

/**
 * @author shengdonghu@126.com
 * 
 */
public class LinuxPathUtil {

    public static String concatLinuxPath(String p1, String p2) {

        if (StringUtils.isBlank(p1)) {
            return p2;
        }
        if (StringUtils.isBlank(p2)) {
            return p1;
        }
        if (!p1.endsWith("/")) {
            p1 = p1 + "/";
        }
        if (p2.startsWith("/")) {
            p2 = p2.substring(1);
        }
        return p1 + p2;
    }
}
